package com.jt.tenant.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.jt.tenant.R;

public class PromptActivity extends JTActivity implements View.OnClickListener {

    private ImageView bcak,content;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_prompt);

        initView();

        getFlag();
    }

    private void initView() {

        (bcak = (ImageView) findViewById(R.id.prompt_close)).setOnClickListener(this);

        content = (ImageView) findViewById(R.id.prompt_content);


    }

    private void getFlag(){

        String flag = getIntent().getStringExtra("flag");
        if(flag.equals("map")){
            content.setImageResource(R.mipmap.prompt_map);
        }else if(flag.equals("maintenance")){
            content.setImageResource(R.mipmap.prompt_maintain);
        }else if(flag.equals("insurance")){
            content.setImageResource(R.mipmap.prompt_insurance);
        }else if(flag.equals("oil")){
            content.setImageResource(R.mipmap.prompt_oil);
        }

    }

    @Override
    public void onClick(View view) {

        super.onClick(view);

        switch (view.getId()) {

            case R.id.prompt_close:

                finish();

                break;


        }

    }


}
